package com.qianniu.napi.admin.entity;

import com.baomidou.mybatisplus.enums.IdType;
import java.util.Date;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableName;
import com.qianniu.napi.admin.web.AreaController;

import java.io.Serializable;

/**
 * <p>
 * 收货地址
 * </p>
 *
 * @author chenxuebin
 * @since 2018-06-11
 */
@TableName("t_address")
public class Address extends Model<Address> {

    private static final long serialVersionUID = 1L;

	@TableId(value="id", type= IdType.AUTO)
	private Long id;
    /**
     * 详细地址
     */
	private String address;

    /**
     * 省代码
     */
	@TableField("province_code")
	private String provinceCode;

	private String province;

    /**
     * 市代码
     */
	@TableField("city_code")
	private String cityCode;

	private String city;
    /**
     * 区代码
     */
	@TableField("district_code")
	private String districtCode;

	private String district;

    /**
     * 邮政编码
     */
	private String postcode;

    /**
     * 联系人
     */
	private String linkman;
    /**
     * 联系电话
     */
	private String phone;
    /**
     * 身份证号
     */
	private String idcard;

    /**
     * 启用状态
     */
	private Integer state;

    /**
     * 启用状态
     */
	private Long mid;
	private Long mpid;
	private Long modifier;
    /**
     * 是否默认 0非默认 1默认
     */
	@TableField("is_default")
	private Integer isDefault;
	private Long uid;

	private Date createtime;
	private Date modifytime;


	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public String getProvinceCode() {
		return provinceCode;
	}

	public void setProvinceCode(String provinceCode) {
		this.provinceCode = provinceCode;
	}

	public String getCityCode() {
		return cityCode;
	}

	public void setCityCode(String cityCode) {
		this.cityCode = cityCode;
	}

	public String getDistrictCode() {
		return districtCode;
	}

	public void setDistrictCode(String districtCode) {
		this.districtCode = districtCode;
	}

	public String getPostcode() {
		return postcode;
	}

	public void setPostcode(String postcode) {
		this.postcode = postcode;
	}

	public String getLinkman() {
		return linkman;
	}

	public void setLinkman(String linkman) {
		this.linkman = linkman;
	}

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getIdcard() {
		return idcard;
	}

	public void setIdcard(String idcard) {
		this.idcard = idcard;
	}

	public Integer getState() {
		return state;
	}

	public void setState(Integer state) {
		this.state = state;
	}

	public Long getMid() {
		return mid;
	}

	public void setMid(Long mid) {
		this.mid = mid;
	}

	public Integer getIsDefault() {
		return isDefault;
	}

	public void setIsDefault(Integer isDefault) {
		this.isDefault = isDefault;
	}

	public Long getUid() {
		return uid;
	}

	public void setUid(Long uid) {
		this.uid = uid;
	}

	public Date getCreatetime() {
		return createtime;
	}

	public void setCreatetime(Date createtime) {
		this.createtime = createtime;
	}

	public Date getModifytime() {
		return modifytime;
	}

	public void setModifytime(Date modifytime) {
		this.modifytime = modifytime;
	}

	public Long getModifier() {
		return modifier;
	}

	public void setModifier(Long modifier) {
		this.modifier = modifier;
	}

	public Long getMpid() {
		return mpid;
	}

	public void setMpid(Long mpid) {
		this.mpid = mpid;
	}

	//	public String getProvince() {
//		return AreaController.getAreaName(provinceCode);
//	}
//
//	public void setProvince(String province) {
//		this.province = province;
//	}
//
//	public String getCity() {
//		return AreaController.getAreaName(cityCode);
//	}
//
//	public void setCity(String city) {
//		this.city = city;
//	}
//
//	public String getDistrict() {
//		return AreaController.getAreaName(districtCode);
//	}
//
//	public void setDistrict(String district) {
//		this.district = district;
//	}

	@Override
	protected Serializable pkVal() {
		return this.id;
	}

	@Override
	public String toString() {
		return "Address{" +
			"id=" + id +
			", address=" + address +
			", provinceCode=" + provinceCode +
			", cityCode=" + cityCode +
			", districtCode=" + districtCode +
			", postcode=" + postcode +
			", linkman=" + linkman +
			", phone=" + phone +
			", idcard=" + idcard +
			", state=" + state +
			", isDefault=" + isDefault +
			", uid=" + uid +
			", createtime=" + createtime +
			", modifytime=" + modifytime +
			"}";
	}
}
